import {GOLOGIN,GETUSETINFO} from './action-type';
import cookie from 'react-cookies';
const user = {
  status:0,
  userinfo:{},
}
export function counter(state=user,action){
  // console.log(cookie.load('user-status'))
  switch(action.type){
    case GOLOGIN:
      state.status = cookie.load('user-status')!='undefined'?cookie.load('user-status'):1
      return state;
    default:
      return state;
  }
}